package modifyx

type IRoot interface {
	IObject

	RefClassId() string
	// Catalog/Id
	RefClassKey() string
	RefClassCatalog() string
	RefClassType() string
	RefDispose()
	RefData() map[string]interface{}
}

type IObject interface {
	RefSourceData() map[string]interface{}
	RefSource(field string) interface{}
	RefInt(field string) (val int)
	RefUint(field string) (val uint)
	RefFloat64(field string) (val float64)
	RefString(field string) (val string)
	RefBool(field string) (val bool)
	RefMap(field string) (r IObject)
	RefObject(field string) (r IObject)
	RefArray(field string) (r IArray)
	RefIsNil() bool
	RefKeys() (r []string)
	RefLength() int
	RefClassCreator(field string, creator func(object IObject) IObject)

	SetRuntimeFloat(field string, val float64)
	SetRuntimeInt(field string, val int)
	SetRuntimeBool(field string, val bool)
	SetRuntimeString(field string, val string)
}

type IArray interface {
	RefInt(index int) (val int)
	RefUint(index int) (val uint)
	RefFloat(index int) (val float64)
	RefString(index int) (val string)
	RefBool(index int) (val bool)
	RefObject(index int) (r IObject)
	RefLength() int
}
